﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Flagwind.Data
{
	/// <summary>
	/// SQL查询命令信息(与具体数据库无关)。
	/// </summary>
	public class SqlInfo
	{
		#region 公共属性

		public string Sql
		{
			get;
			private set;
		}

		public Dictionary<string, TableNameField> Parameters
		{
			get;
			private set;
		}

		public System.Data.CommandType CommandType
		{
			get;
			set;
		}

		public string TableName
		{
			get;
			set;
		}

		#endregion

		#region 构造方法

		public SqlInfo(string sql)
		{
			this.Sql = sql;
		}

		public SqlInfo(string sql, Dictionary<string, TableNameField> parameter)
		{
			this.Sql = sql;
			this.Parameters = parameter;
		}

		#endregion
	}
}